<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>switch条件语句</title>
</head>
<body>
    <p>switch条件语句语法：</p>
    <p><span>switch(表达式)&nbsp;&nbsp;&nbsp;&nbsp;//()中是要进行判断的对象<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;case 值:&nbsp;&nbsp;&nbsp;&nbsp;//case 是要判断的对象值<br>&nbsp;&nbsp;&nbsp;&nbsp;···<br>&nbsp;&nbsp;&nbsp;&nbsp;执行语句;break;<br>&nbsp;&nbsp;&nbsp;&nbsp;default:<br>&nbsp;&nbsp;&nbsp;&nbsp;执行语句;break;<br>}</span></p>
</body>
</html>